import request from '@/utils/request'

// 获取部门的列表
export const getDepartments = () => {
  return request.get('/company/department')
}
// 获取部门负责人信息
export const getEmployeesSimple = () => {
  return request.get('/sys/user/simple')
}
// 新增部门
export const addDepartments = data => {
  return request.post('/company/department', data)
}
// 获取部门详情
export const getDepartmentsDetail = id => {
  return request.get(`/company/department/${id}`)
}
// 编辑部门
export function editDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
export const delDepartments = id => {
  return request.delete(`/company/department/${id}`)
}

